{% extends 'bootstrap/base.html' %}
{% import "bootstrap/wtf.html" as wtf %}

{% block title %}Flasky{% endblock %}

{% block navbar %}
<div class="navbar navbar-inverse" role="navigation">
	<div class="container">
		<div class="navbar-header">
			<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
					<span class="sr-only">Toggle navigation</span>
					<span class="icon-bar"></span>
					<span class="icon-bar"></span>
					<span class="icon-bar"></span>
			</button>
			<a href="/" class="navbar-brand">Flasky</a>
		</div>
		<div class="navbar-collapse collapse">				
			<ul class="nav navbar-nav navbar-right">
				<li><a href="/admin/control">控制台</a></li>
				<li><a href="/admin/add">新增用户</a></li>
		        <li><a href="/logout">退出</a></li>
		    </ul>
		    <ul class="nav navbar-nav">
				<li><a href="/">首页</a></li>
			</ul>
		</div>
	</div>
</div>
{% endblock %}

{% block content %}
<div class="container">
	{% for message in get_flashed_messages() %}
		<div class="alert alert-warning">
			<button type="button" class="close" data-dismiss="alert">&times;</button>
			{{ message }}
		</div>
	{% endfor %}
	{{ wtf.quick_form(form) }}
</div>
{% endblock %}